﻿@model IEnumerable<SeagullConsulting.MvcAjaxControls.Data.Models.Phone>
@using SeagullConsulting.MvcAjaxControls.Web.Mvc.Helpers;

@{
	ViewBag.Title = "List Phones Paged";
}

<h2>Phones - Paged List</h2>
<p>
	@Html.ActionLink("Add New", "Create", null, new { @class = "actionButton" })
</p>
@(Html.AjaxGridFor<SeagullConsulting.MvcAjaxControls.Data.Models.Phone>()
	.WithColumns(column => {
		column.Expression("Number", p => p.Number);
	})
	.WithActionColumns(column => {
		column.ImageActionLink("Details", "Details", p => p.Id, @Url.Content("~/Content/Images/Details.png"));
		column.ImageActionLink("Edit", "Edit", p => p.Id, @Url.Content("~/Content/Images/Edit.png"));
		column.ImageActionLink("Delete", "Delete", p => p.Id, @Url.Content("~/Content/Images/Delete.png"));
	})
	.FromDataSource(@Url.Action("ListPhone"))
	.WithPaging(10)
	.ToHtml()
)
<br />
@Html.ActionLink("Phones Index", "Index")

